package w15;

import java.util.Scanner;

public class b02 {

	public static void main(String[] args) {
		 System.out.println("输入人数");
		 Scanner ss= new Scanner(System.in);
		 int n = ss.nextInt();
		 int[] a= new int [n];
		 int sum =0;
		 System.out.println("adad");
		 
		 for(int i = 0;i<n;i++) {
		 a[i]= ss.nextInt();
		  sum+=a[i];
		 }
		 double jz= (double)sum/a.length;
		 System.out.printf("%.1f\n", jz);
		 for( int i = 0 ;i<n;i++) {
			 System.out.printf("%d %5.1f\n",a[i],a[i]-jz);
		 }
		 
	}

}
